package com.stormrage.edu.serv.learn.impl;

import java.util.HashMap;
import java.util.Map;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.stormrage.edu.dao.learn.LeaBunchOperDao;
import com.stormrage.edu.serv.learn.LeaBunchOperServ;
import com.stormrage.entity.learn.LeaBunchOper;
import com.stormragetech.core.exception.StormrageTechException;

/**
 * @Title: LeaBunchOperServImpl.java
 * @Package com.stormrage.edu.serv.learn.impl
 * @Description: 班级实操成绩 Service
 * @author www.stormragetech.com
 * @date 2016年4月27日
 * @version V1.0
 */
@Service
public class LeaBunchOperServImpl implements LeaBunchOperServ {

	private static final Logger logger = LoggerFactory.getLogger(LeaBunchOperServImpl.class);

	@Autowired
	private LeaBunchOperDao leaBunchOperDao;

	@Override
	public Integer create(final LeaBunchOper arg0) throws StormrageTechException {

		logger.debug(" 【 Serv 】- 【 LeaBunchOperServ 】- 【 create 】- 开始运行 ");

		Integer index = leaBunchOperDao.create(arg0);

		logger.debug(" 【 Serv 】- 【 LeaBunchOperServ 】- 【 create 】- 结束运行 ");
		return index;

	}

	@Override
	public void update(final LeaBunchOper arg0) throws StormrageTechException {

		logger.debug(" 【 Serv 】- 【 LeaBunchOperServ 】- 【 update 】- 开始运行 ");

		leaBunchOperDao.update(arg0);

		logger.debug(" 【 Serv 】- 【 LeaBunchOperServ 】- 【 update 】- 结束运行 ");

	}

	@Override
	public LeaBunchOper queryById(final Integer arg0) throws StormrageTechException {

		logger.debug(" 【 Serv 】- 【 LeaBunchOperServ 】- 【 queryById 】- 开始运行 ");

		Map<String, Object> map = new HashMap<String, Object>();
		map.put("id", arg0);

		LeaBunchOper entity = leaBunchOperDao.queryById(map);

		logger.debug(" 【 Serv 】- 【 LeaBunchOperServ 】- 【 queryById 】- 结束运行 ");
		return entity;

	}

}
